/*
 * MyStack.h
 *
 *  Created on: Jan 28, 2012
 *      Author: Georgios
 */

#ifndef MYSTACK_H_
#define MYSTACK_H_

typedef void *stackElement_t; /* Give it a generic name--makes  */
                              /* changing the type of things in */
                              /* the stack easy.                */

typedef struct stack_T {
  stackElement_t *contents;
  int top;
  int maxSize;
} stack_t;


/*
 ** Initialize an empty stack.
 ** Return 0 if not initialized
 */
int StackInit(stack_t *stackP, int maxSize);

/* Destroy the stack. */
void StackDestroy(stack_t *stackP);

/* Check the stack if empty*/
int StackIsEmpty(stack_t *stackP);

/* Check the stack if full*/
int StackIsFull(stack_t *stackP);

/* Push one element to the stack*/
int StackPush(stack_t *stackP, stackElement_t element);

/* Pop one element from the stack*/
stackElement_t * StackPop(stack_t *stackP);

#endif /* MYSTACK_H_ */
